<?php

namespace App\Http\Controllers\Login;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class UserController extends Controller
{

    //获取用户信息
    public static function getUserInfo()
    {

        $user = session('user');
        if(!$user){
            //删除
            throw new \Exception("请先登录");
        }
        return $user;
    }
}

